/**
 * @author oxchains
 * @time 2018-08-30 14:16
 * @name Test
 * @desc:
 */
public class Test {
    public static void main(String[] args) {
        WechatServer server = new WechatServer();

        Observer chen = new User("chen");
        Observer liu = new User("liu");
        Observer zhang = new User("zhang");

        server.addObserver(chen);
        server.addObserver(liu);
        server.addObserver(zhang);

        server.setMessage("一家人");

        server.removeObserver(zhang);

        server.setMessage("I am with you");

    }
}
